{extend name="base" /}
{block name="body"}

<div class="am-padding am-padding-bottom-0">
	<strong class="am-text-primary am-text-lg">管理员</strong> / <small>编辑</small>
</div>

<div class="am-padding am-btn-toolbar">
	<div class="am-btn-group am-btn-group-xs">
		<a href="{:url('admin/admin/index')}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 列表</a>
		<a href="{:url('admin/admin/add')}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</a>
		<button type="button" class="am-btn am-btn-default"><span class="am-icon-trash-o"></span> 删除</button>
	</div>
</div>

<form class="am-form"  action="{:url('admin/admin/edit')}" method="post">
	<input type="hidden" name="id" value="{$admin.id}">
	<fieldset>


		<div class="am-g">
			<div class="am-u-lg-4">
				<div class="am-form-group am-form-file">
					<div class="am-form-file-image">
						<img {empty name="$admin.avatar"}src="/static/common/images/avatar.png"{else/}src="{$admin.avatar|get_thumb=###,200,200}"{/empty} alt="avatar" class="am-img-thumbnail am-center am-circle" id="view-image">
						<input type="file" class="ajax-upload-file" data-url="{:url('api/Upload/index')}" data-dir="avatar" data-purpose="avatar" data-allowext="jpg,gif,jpeg,png" data-ipt="#ipt-image" data-src="#view-image">
					</div>
					<div class="am-input-group">
						<span class="am-input-group-label">头像</span>
						<input type="text" id="ipt-image" name="avatar" value="{$admin.avatar}" class="am-form-field" placeholder="头像地址">				
					</div>
				</div>
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">昵称</span>
						<input type="text" name="nickname" value="{$admin.nickname}" class="am-form-field" placeholder="请输入昵称">
					</div>
				</div>
			</div>
			<div class="am-u-lg-8">
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">用户名</span>
						<input type="text" name="username" value="{$admin.username}" class="am-form-field" placeholder="请输入用户名">
					</div>
				</div>
				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">密码</span>
						<input type="text" name="password" value="" class="am-form-field" placeholder="不修改则留空">
					</div>
				</div>

				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">所属组</span>
						<select name="admin_group_id" class="am-form-field">
							{foreach name="admin_group_list" item="vo"}
							<option value="{$vo.id}" {if condition="$admin.admin_group_id==$vo.id"} selected="selected"{/if}>{$vo.title}</option>
							{/foreach}
						</select>
					</div>
				</div>


				<div class="am-form-group">
					<div class="am-input-group">
						<span class="am-input-group-label">状态</span>
						<div class="am-form-field">
							<label class="am-radio-inline">
								<input type="radio" name="status" value="1" data-am-ucheck {if condition="$admin.status==1"}checked{/if}> 正常
							</label>
							<label class="am-radio-inline">
								<input type="radio" name="status" value="0" data-am-ucheck {if condition="$admin.status==0"}checked{/if}> 禁用
							</label>
						</div>
					</div>
				</div>
				<p><button type="reset" class="am-btn am-btn-default">重置</button> <button type="submit" lay-submit lay-filter="submit" class="am-btn am-btn-default">更新</button></p>
				
			</div>
		</div>

		


		
	</fieldset>
</form>


{/block}